﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace NGuice.Inject.Internal.Util
{
    /// <summary>
    /// 从java中移植而来
    /// </summary>
    public class AssertionError: Exception
    {
        /**
     * Constructs an AssertionError with no detail message.
     */
        public AssertionError()
        {
        }

        /**
         * This internal constructor does no processing on its string argument,
         * even if it is a null reference.  The public constructors will
         * never call this constructor with a null argument.
         */
        public AssertionError(string detailMessage)
            :base(detailMessage)
        {
        }


        /**
         * Constructs an AssertionError with its detail message derived
         * from the specified <code>boolean</code>, which is converted to
         * a string as defined in section 15.18.1.1 of
         * <cite>The Java&trade; Language Specification</cite>.
         *
         * @param detailMessage value to be used in constructing detail message
         */
        public AssertionError(bool detailMessage)
            :this("" + detailMessage)
        {
            
        }

        /**
         * Constructs an AssertionError with its detail message derived
         * from the specified <code>char</code>, which is converted to a
         * string as defined in section 15.18.1.1 of
         * <cite>The Java&trade; Language Specification</cite>.
         *
         * @param detailMessage value to be used in constructing detail message
         */
        public AssertionError(char detailMessage)
            : this("" + detailMessage)
        {
        }

        /**
         * Constructs an AssertionError with its detail message derived
         * from the specified <code>int</code>, which is converted to a
         * string as defined in section 15.18.1.1 of
         * <cite>The Java&trade; Language Specification</cite>.
         *
         * @param detailMessage value to be used in constructing detail message
         */
        public AssertionError(int detailMessage)
            : this("" + detailMessage)
        {
        }

        /**
         * Constructs an AssertionError with its detail message derived
         * from the specified <code>long</code>, which is converted to a
         * string as defined in section 15.18.1.1 of
         * <cite>The Java&trade; Language Specification</cite>.
         *
         * @param detailMessage value to be used in constructing detail message
         */
        public AssertionError(long detailMessage)
            : this("" + detailMessage)
        {
        }

        /**
         * Constructs an AssertionError with its detail message derived
         * from the specified <code>float</code>, which is converted to a
         * string as defined in section 15.18.1.1 of
         * <cite>The Java&trade; Language Specification</cite>.
         *
         * @param detailMessage value to be used in constructing detail message
         */
        public AssertionError(float detailMessage)
            : this("" + detailMessage)
        {
        }

        /**
         * Constructs an AssertionError with its detail message derived
         * from the specified <code>double</code>, which is converted to a
         * string as defined in section 15.18.1.1 of
         * <cite>The Java&trade; Language Specification</cite>.
         *
         * @param detailMessage value to be used in constructing detail message
         */
        public AssertionError(double detailMessage)
            : this("" + detailMessage)
        {
        }

        /**
         * Constructs a new {@code AssertionError} with the specified
         * detail message and cause.
         *
         * <p>Note that the detail message associated with
         * {@code cause} is <i>not</i> automatically incorporated in
         * this error's detail message.
         *
         * @param  message the detail message, may be {@code null}
         * @param  cause the cause, may be {@code null}
         *
         * @since 1.7
         */
        public AssertionError(string message, Exception cause)
           : base(message, cause)
        {
        }
    }
}
